<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<script type="text/javascript">	
$(function() {
	$.jgrid.ajaxOptions.type = 'post';
	$("#gridTable").jqGrid(
			{
				url:'cms/register/view',
        		datatype: "json",
        		rownumbers:true,
        		autowidth:true, 
                height: 300,
 				colNames : ['用户昵称', '手机号码', '状态','推荐用户ID', '创建时间','unionid','邮箱','会员名称'],
				colModel : [ 
				{
					name : 'nickname',
					index : 'nickname',
					width:50,
					sortable : false
				}, {
					name : 'mobile',
					index : 'mobile',
					width:80,
					sortable : false
				}, {
					name : 'status',
					index : 'status',
					width:100,
					sortable : false,
					formatter:function(cell,options,row){
						if(row.status=='1'){
							return '可用';
						}
						return '不可用';
					}
				}, {
					name : 'recommUserId',
					index : 'recommUserId',
					sortable : false
				}, {
					name : 'createDate',
					index : 'createDate',
					sortable : false
				}, {
					name : 'unionid',
					index : 'unionid',
					sortable : false
				}, {
					name : 'email',
					index : 'email',
					sortable : false
				} , {
					name : 'memberName',
					index : 'memberName',
					sortable : false
				}  
				],
				rowNum : 10,
				rowList : [ 10, 20, 30 ],
				jsonReader : {
					root : "data",
					id : "id",
					page : "index",
					records : "totalRecord",
					repeatitems : false
				},
				pager : "#pgtoolbar"
			});
});
 
function search() {
	var param = {
			userName : $('#userName').val(),
			email : $('#email').val(),
			mobile : $('#mobile').val(),
			memberName : $('#memberName').val()
			
	};
	 
	var postData = $("#gridTable").jqGrid("getGridParam", "postData");
	$.extend(postData, param);
	$("#gridTable").jqGrid("setGridParam").trigger("reloadGrid", [ {
		page : 1
	} ]);
}
</script>
</head>
<body>
		<div class="r_location">
			<i class="r_txtico"></i>微信内容管理&gt;用户注册数据管理
		</div>
		
		<form id="rForm" action="" method="POST">
		<ul class="all_list">
			<li>
				<span class="all_title">用户昵称：</span> 
				<span><input type="text" id="userName" name="userName" class="ui_input" /></span>
				<span class="all_title">邮箱：</span> 
				<span><input type="text" id="email" name="email" class="ui_input" /></span>
				<span class="all_title">手机号：</span> 
				<span><input type="text" id="mobile" name="mobile" class="ui_input" /></span>
				<br/><span class="all_title">会员名称：</span> 
				<span><input type="text" id="memberName" name="memberName" class="ui_input" /></span>
				<span class="all_title"></span> 
				<span ><input type="button" onclick="search()" value="查询" class="search_btn m-r15" /></span>
			</li>
		</ul>
		<div class="clearfix table_fn">
			<span class="l">用户注册数据管理数据列表</span>
		</div>
		<table id="gridTable"></table>
		<div id="pgtoolbar"></div>
	</form>
	 
</body>
</html>